import React from 'react'

class List extends React.Component{
	render(){
		const {list} = this.props;
		let length = list.length==0?'block':'none';
		return (
			<div>
				<p style={{display:length}}>Loading...</p>
				<ul>
					{
						list && list.map((item, i)=>{
							return <li key={i}>{item}</li>
						})
					}
				</ul>
			</div>
		)
	}
}

export default List